package com.example.user

import com.example.lib_base.BaseViewModel
import com.example.lib_base.UIIntent
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject

@HiltViewModel
class UserViewModel @Inject constructor(private val userRepo: UserRepo) : BaseViewModel<UserIntent>() {
    override fun handleIntent(it: UIIntent) {
        when (it) {
            is UserIntent.Register -> {
                roomRequest(userRepo.register(it.user))
            }
        }
    }
}